package org.amicofragile.metaclass;

import org.junit.Assert
import org.junit.Test

class StringEnhancementTest {
	@Test
	public void addMethodToString() {
		String.metaClass.toNormalForm = {
			"[" + delegate + "]:" + delegate.toLowerCase()
		};
	
		def input = "Pietro";
		def output = input.toNormalForm();
		Assert.assertEquals("[Pietro]:pietro", output)
	}
}
